<div class="new_bd clearfix">
        <?php echo $this->render('index/left.phtml');?>
        <!-- 主栏 -->
        <div class="new_mn">
        	<b class="spbg2 corner tl"></b>
    		<b class="spbg2 corner tr"></b>
    		<b class="spbg2 corner bl"></b>
    		<b class="spbg2 corner br"></b>
    		<div class="titlebar clearfix">FOOTBALL QUIZ</div>
    		<?php foreach ($this->matchList as $v):?>
			<?php 
				$teamA = $this->matchInfo->getTeam($v->TeamA);
				$teamB = $this->matchInfo->getTeam($v->TeamB);
				$rateA = $this->matchInfo->getRate($v->MatchID, $teamA['flid']);
				$rateB = $this->matchInfo->getRate($v->MatchID, $teamB['flid']);
			?>
    		<div class="jc_mainbox clearfix">
    			<div class="teamA">
    				<img src="<?php echo $v->TeamALogo;?>" />
    				<span><?php echo $teamA['en_flname']?></span>
    			</div>
    			<div class="vsbox">
    				<span class="top clearfix">
    					 <img src="<?php echo $v->MatchLogo;?>" alt="" width="152" height="56" />
    				</span>
    				<span class="middle spbg2 clearfix"></span>
    				<span class="fb_box clearfix"><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="<?php echo MY_URL;?>/match-index?matchid=<?php echo $v->MatchID;?>" send="false" layout="button_count" show_faces="true" font=""></fb:like></span>
    				<span class="bottom0"><br /><?php echo date('m-d H:i', $v->MatchTime);?></span>
    				<span class="bottom1">
    					<ul>
    						<li>
    							<span class="left"><?php echo $teamA['en_flname']?></span>
    							<span class="right"><?php echo $rateA['Rate'];?></span>
    						</li>
    						<li>
    							<span class="left"><?php echo $teamB['en_flname']?></span>
    							<span class="right"><?php echo $rateB['Rate'];?></span>
    						</li>
    					</ul>
    				</span>
    			</div>
    			<div class="teamB">
    				<img src="<?php echo $v->TeamBLogo;?>" />
    				<span><?php echo $teamB['en_flname']?></span>
    			</div>
    			<div class="choose clearfix">
    				<span class="choose_teamA spbg2">
    				<?php if ($v->MatchStatus == 0):?>
    					<a class="spbg2" <?php if($this->member_type=="buyer"):?>href="javascript:void(0)" onclick="GGSHOP.match.chipin(<?php echo $teamA['flid']?>, <?php echo $v->MatchID;?>)"<?php else:?>href="/auth-login?preurl=/match"<?php endif;?>>CHOOSE</a>
    				<?php else:?>
    					<a style="background-position: 0 -733px;color: #252525;" class="spbg2">CHOOSE</a>
    				<?php endif;?>
    				</span>
    				<span class="choose_comment"><?php if ($v->MatchStatus == 0):?>In Progress<?php else:?>Game Over<?php endif;?></span>
    				<span class="choose_teamB spbg2">
    				<?php if ($v->MatchStatus == 0):?>
    					<a class="spbg2" <?php if($this->member_type=="buyer"):?>href="javascript:void(0)" onclick="GGSHOP.match.chipin(<?php echo $teamB['flid']?>, <?php echo $v->MatchID;?>)"<?php else:?>href="/auth-login?preurl=/match"<?php endif;?>>CHOOSE</a>
    				<?php else:?>
    					<a style="background-position: 0 -733px;color: #252525;" class="spbg2">CHOOSE</a>
    				<?php endif;?>
    				</span>
    				<input type="hidden" name="matchstatu" value="<?php echo $v->MatchStatus;?>"></input>
    				<input type="hidden" name="matchid" value="<?php echo $v->MatchID;?>"></input>
    			</div>
    		</div>
    		<?php endforeach;?>
    		<div class="pages clearfix">
    			<div class="g-pages-style">
    				<?php echo $this->pageString;?>
    			</div>
    		</div>
    		<div class="comment_box clearfix">
    			<div class="tips">
    				<font>MESSAGE</font>
    				<!-- 
    				<a class="pictures spbg2" href="">Pictures</a>
    				<a class="emotion spbg2" href="">Emotion</a>
    				 -->
    			</div>
    			<a name="comment"></a>
    			<div class="message">
    				<span class="myhead">
    				<?php $user = $this->member->getUserDetails(array('uid'=>$_COOKIE[COOKIE_PRE . 'uid']));?>
    				<?php if (!empty($user)):?>
    					<img src="<?php if ($user[0]['headimg']){echo $user[0]['headimg'];} else {echo 'images/jc/JC_03.png';}?>" alt="" width="67" height="67"/>
    					<font><?php $row = $this->buyer->getUserDetails(array('uid'=>$_COOKIE[COOKIE_PRE . 'uid'])); echo $row[0]['nick_name'];?></font>
    				<?php else:?>
    					<img src="images/jc/JC_03.png" alt="" />
    				<?php endif;?>
    				</span>
    				<textarea name="comment" id="comment"></textarea>    				    				<input class="spbg2" type="button" name="Publish" value="Publish" onclick="GGSHOP.match.addComment();"/>
    			</div>
    			<ul class="comment_list" id="list_comment">
    			<img alt="loading..." src="images/loading.gif" />
    				<script type="text/javascript">
    					GGSHOP.match.loadComment($('input[name="matchid"]').val());
    				</script>
    			</ul>
    		</div>
        </div>
        <div class="new_mn">
        	<b class="spbg2 corner tl"></b>
    		<b class="spbg2 corner tr"></b>
    		<b class="spbg2 corner bl"></b>
    		<b class="spbg2 corner br"></b>
    		<div class="titlebar clearfix">CLUB RANKING</div>
    		<div class="ranking_box clearfix">
    			<ul class="left">
    				<?php $i = 0;?>
    				<?php foreach ($this->topClub as $v):?>
    				<?php $i++;?>
	    				<li>
	    					<span class="color0 no"><?php echo $i;?></span>
	    					<span class="name"><?php echo $v['en_flname'];?></span>
	    					<span class="integral">dollar:<strong><?php echo $this->score->score2dollar($v['integral']);?></strong></span>
	    					<span class="img"><img src="<?php echo $v['logostr'];?>" alt="<?php echo $v['en_flname'];?>"  onerror="javascript:this.src ='/html/images/nothingpic.jpg'" width="36" height="40" /></span>
	    				</li>
    				<?php endforeach;?>    				
    			</ul>
    			<ul class="right">
    				<?php $i = 0;?>
    				<?php foreach ($this->topClubMore as $v):?>
    				<?php $i++;?>
	    				<li>
	    					<span class="no"><?php echo $i;?>.</span>
	    					<span class="name"><?php echo $v['en_flname'];?></span>
	    					<span class="integral">dollar:<?php echo $this->score->score2dollar($v['integral']);?></span>
	    				</li>
    				<?php endforeach;?>
    			</ul>
    		</div>
    		<div class="titlebar clearfix">DISCUSSION</div>
    		<div class="discussion_box clearfix">
    			<div class="mr">
    				<span class="bar">
						<strong>Member Ranking</strong>
						<!--<a href="">MORE &gt;&gt;</a>-->
					</span>
					<ul>
						<?php $i = 0;?>
						<?php foreach ($this->userArray as $v):?>
						<?php $i++;?>
						<li>
							NO.<?php echo $i;?>: <?php $user = $this->buyer->getUserDetails(array('uid'=>$v['uid']));?>
							<?php echo $user[0]['nick_name'];?>							    
						</li>
						<?php endforeach;?>
					</ul>
    			</div>
    			<div class="lz">
    				<span class="bar">
    					<strong>League Zonei</strong>
    				</span>
    				<ul>
    				<?php foreach ($this->oldMatchList as $v):?>    					
    					<li><a href="/match-index?matchid=<?php echo $v->MatchID;?>"><img src="<?php echo $v->MatchLogo;?>" alt="" width="152" height="56" /></a></li>
    				<?php endforeach;?>
    				
    					
    				</ul>
    			</div>
    		</div>
        </div>
    </div>
	 <div class="w-blk0 w-blk-jcwin" id="jc_chipin" style="margin:10px;display: none; position:absolute;">
	      <h2 class="blk0h2 f-iblk clearfix">
	          <span class="spbg blkhdl">BET</span>
	          <span class="spbg blkhdr"><input class="spbg" type="button" value="" onclick="GGSHOP.match.hide();"/></span>
	      </h2>
	      <div class="blkbody">
	         <div class="inner-blkbody">
	             <div class="jctitle">You have $<span class="jdoller" id="my_score">0</span> !</div>
	                 <div class="jccontent">
	                 <input type="text" class="money-input" name="score" id="score" onkeyup="this.value=this.value.replace(/[^\d]/g,'');"/> <input class="bet-btn spbg" type="button" value="BET" onclick="GGSHOP.match.bet();"/>
	             </div>
	         </div>
	      </div>
	 </div>
<script type="text/javascript">
	$(function(){GGSHOP.match.loadScore();})
</script>   
